-- BP 7.1.6 content: Package syschar: 3 persistence-version: 7.1.6

INSERT INTO EP_PKG
	VALUES ("e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	"c8b88000-dddc-4206-8410-2f69b8f86b67",
	'Dynamic Model Bridges',
	'Incoming bridges for creating model elements of the Dynamics subsystem as 
metamodel instances.
',
	0);
INSERT INTO GD_MD
	VALUES ("ca326f2b-2154-41e9-a791-c45c69dbf44b",
	112,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	108,
	0,
	0,
	1,
	1,
	1,
	12,
	1,
	0,
	0,
	0,
	0,
	0,
	'',
	'shlaer-mellor-metamodel::metamodel::Shlaer-Mellor Metamodel::Incoming Bridges::Dynamic Model Bridges');
INSERT INTO DIM_DIA
	VALUES ("ca326f2b-2154-41e9-a791-c45c69dbf44b",
	'',
	1.000000,
	0.000000,
	0.000000,
	"00000000-0000-0000-0000-000000000000");
INSERT INTO S_SYNC
	VALUES ("26180ecb-7508-4956-8844-7e8f99e2ac14",
	"00000000-0000-0000-0000-000000000000",
	'addDataToEntryRule',
	'Add a data member to an entry rule. An entry rule with no data members will not 
allow an event with parameters to be assigned to it''s transition. An entry rule 
with data will use the data to ensure the same data rule is followed whenever 
an event is assigned to it''s transition.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where (selected.name == param.object);
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select one model related by sub->LIF[R347]->SM[R300];
    if (empty model)
      select one model related by sub->ASR[R354]->SM[R300];
    end if;
    if (empty model)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"State model not instantiated!" );
    else
      select any sta from instances of STA where (selected.name == param.stateName) and (selected.model_id == model.id);
      if (empty sta)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"State, " + param.stateName + ", not instantiated!" );
      else
        select any type from instances of TYPE where selected.name == param.dataType;
        if (empty type)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Data type, " + param.dataType + ", not instantiated!" );
        else
          select one enrl related by sta->ENRL[R325];
          if (empty enrl)
            result = creationResult_t::FAILURE;
            LOG::LogFailure( message:"Entry rule not instantiated for state, " + param.stateName + "!" );
          else
            create object instance end of END;
            relate type to end across R359;
            LOG::LogInfo( message:"Entry data instantiated without any event parameters!" );
          end if;
        end if;
      end if;
    end if;
  end if;
end if;
return result;

',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("50e6416e-bb5e-4d0e-b458-65baf45d4a68",
	"26180ecb-7508-4956-8844-7e8f99e2ac14",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("ccbed9b0-3c7c-4261-a8d3-d531c0d1f29f",
	"26180ecb-7508-4956-8844-7e8f99e2ac14",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"50e6416e-bb5e-4d0e-b458-65baf45d4a68",
	'The name of the object by which the event is accessed.');
INSERT INTO S_SPARM
	VALUES ("71d15c71-0311-429c-81fe-d1a4e3b562dc",
	"26180ecb-7508-4956-8844-7e8f99e2ac14",
	'stateName',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ccbed9b0-3c7c-4261-a8d3-d531c0d1f29f",
	'The name of the state associated with the entry rule.');
INSERT INTO S_SPARM
	VALUES ("7258958c-3da8-4124-a16a-1e79638a8b66",
	"26180ecb-7508-4956-8844-7e8f99e2ac14",
	'dataType',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"71d15c71-0311-429c-81fe-d1a4e3b562dc",
	'');
INSERT INTO PE_PE
	VALUES ("26180ecb-7508-4956-8844-7e8f99e2ac14",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_DT_PROXY
	VALUES ("709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	"00000000-0000-0000-0000-000000000000",
	'creationResult_t',
	'The creation result type is used in conjunction with creating a Shlaer-Mellor 
domain model to verify it is compatible with the metamodel. The result 
enumerator directs the verifier toward further action.',
	'',
	'../../../DataTypes/DataTypes.xtuml');
INSERT INTO S_SYNC
	VALUES ("6986a879-ae96-4a38-b1b3-9cad60982f78",
	"00000000-0000-0000-0000-000000000000",
	'createState',
	'Adds a state to an existing state model.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where selected.name == param.object;
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select one model related by sub->LIF[R347]->SM[R300];
    if (param.isAssigner)
      select one model related by sub->ASR[R354]->SM[R300];
    end if;
    select any sta related by model->STA[R341] where (selected.name == param.name) or (selected.number == param.number);
    if (not empty sta)
      result = creationResult_t::DUPLICATE;
      LOG::LogFailure( message:"State, " + param.name + ", already instantiated!" );
    else
      if (param.isAssigner)
        if ((state_t::CREATION == param.type) or (state_t::DELETION == param.type))
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"State type is invalid for this state model!" );
        else
          select one asr related by sub->ASR[R354];
          if (empty asr)
            result = creationResult_t::FAILURE;
            LOG::LogFailure( message:"Assigner model not instantiated!" );
          else
            select one sm related by asr->SM[R300];
            select one smc related by asr->ASM[R352]->SMC[R350];
            if (state_t::START == param.type)
              select one ncs related by asr->NCS[R345];
              if (not empty ncs)
                result = creationResult_t::DUPLICATE;
                LOG::LogFailure( message:"Start state already instantiated!" );
              else
                create object instance sta of STA;
                sta.name = param.name;
                sta.number = param.number;
                relate sta to sm across R341;
                relate sta to smc across R353;
                create object instance liv of LIV;
                relate liv to sta across R305;
                create object instance cre of CRE;
                relate cre to liv across R306;
                create object instance ncs of NCS;
                relate ncs to cre across R313;
                relate ncs to asr across R345;
              end if;
            else
              create object instance sta of STA;
              sta.name = param.name;
              sta.number = param.number;
              relate sta to sm across R341;
              relate sta to smc across R353;
              create object instance liv of LIV;
              relate liv to sta across R305;
              create object instance nst of NST;
              relate nst to liv across R306;
            end if;
          end if;
        end if; 
      else
        select one lif related by sub->LIF[R347];
        if (empty lif)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Assigner model not instantiated!" );
        else
          select one sm related by lif->SM[R300];
          create object instance sta of STA;
          sta.name = param.name;
          sta.number = param.number;
          relate sta to sm across R341;
          if (state_t::DELETION == param.type)
          else
            create object instance liv of LIV;
            relate liv to sta across R305;
            if (state_t::MIDDLE == param.type)
              create object instance nst of NST;
              relate nst to liv across R306;
            else
              create object instance cre of CRE;
              relate cre to liv across R306;
              if (state_t::CREATION == param.type)
                create object instance scr of SCR;
                relate scr to cre across R313;
              else
                create object instance ncs of NCS;
                relate ncs to cre across R313;
              end if;
            end if;
          end if;
        end if;
      end if;
      if ( state_t::DELETION != param.type )
        LOG::LogInfo( message:"Living state created with no exit rule!" );
      end if;
    end if;
  end if;
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("c5bab493-f7ad-475e-add6-991f5e6d7a29",
	"6986a879-ae96-4a38-b1b3-9cad60982f78",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("85ba5574-ac84-4919-be12-71e6e9bf1ccb",
	"6986a879-ae96-4a38-b1b3-9cad60982f78",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"c5bab493-f7ad-475e-add6-991f5e6d7a29",
	'The name of the object that has behavior specified by the state model.');
INSERT INTO S_SPARM
	VALUES ("4a603803-edbf-4910-ad08-201d88b96c14",
	"6986a879-ae96-4a38-b1b3-9cad60982f78",
	'type',
	"3b3acf5b-5a5f-4cec-8155-7095d6b1741a",
	0,
	'',
	"4215191a-b28a-4f28-a0bf-7fc5be2c3063",
	'The state type being created.');
INSERT INTO S_DT_PROXY
	VALUES ("3b3acf5b-5a5f-4cec-8155-7095d6b1741a",
	"00000000-0000-0000-0000-000000000000",
	'state_t',
	'An enumeration of the possible purposes for a state in a state model.',
	'',
	'../../../DataTypes/DataTypes.xtuml');
INSERT INTO S_SPARM
	VALUES ("4215191a-b28a-4f28-a0bf-7fc5be2c3063",
	"6986a879-ae96-4a38-b1b3-9cad60982f78",
	'isAssigner',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"85ba5574-ac84-4919-be12-71e6e9bf1ccb",
	'Set to true if the state is contained in an assigner state model.');
INSERT INTO S_SPARM
	VALUES ("2807a7ad-07ee-43d9-9ace-5e8e5d48c923",
	"6986a879-ae96-4a38-b1b3-9cad60982f78",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"4a603803-edbf-4910-ad08-201d88b96c14",
	'The name of the state being created.');
INSERT INTO S_SPARM
	VALUES ("317c3f49-bc08-4d64-a9ab-bb7bcef2e426",
	"6986a879-ae96-4a38-b1b3-9cad60982f78",
	'number',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'',
	"2807a7ad-07ee-43d9-9ace-5e8e5d48c923",
	'The number of the state.');
INSERT INTO PE_PE
	VALUES ("6986a879-ae96-4a38-b1b3-9cad60982f78",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("b8989a56-03af-44dc-8124-20b275769095",
	"00000000-0000-0000-0000-000000000000",
	'createStateModelSegment',
	'Adds an empty instance-based state model segment to the specified subset.
    As states are unconditional requirements, an informational log message is 
generated to remind the user that states need to be created.
    Segments can be whole stand-alone state models, or splices of state models. 
At the set level, a state model segment is subtyped as a general segment to 
allow for subset segments to be subtyped as specializing segments. General 
segments can only exist at the object level (topmost) of a subtyping hierarchy.
    Subtype segments are labeled peer segments when they represent a whole 
lifecycle (even if a splice), or a splice when they represent a unique path 
within the whole lifecycle.
    Splices are branches formed via one supertype relationship. Splicing can be 
done multi-level, but a multidirectional supertype requires another splice. An 
object instance can only be in one state at a time, and the state must be 
unambiguous.
    A splice represents a instance-determined branch in the path of the 
lifecycle. A splice should always share a common transition from a common state 
to start the path, but the path doesn''t have to rejoin at the same state or by 
the same transition. The "same data" rule applies to the common transition at 
the start of a splice, even though the instance-based states can have their own 
process models.
    Peer subtype segments are not splices of a supertype; they represent the 
whole lifecycle of an object instance. Peer subtypes restrict the legality of 
the existence of state models among subtypes, because an object instance can''t 
have two concurrent lifecycles; this implies special caution when dealing with 
multidirectional and intersecting subtypes.
    A peer subtype segment will have no segments above it in a subtyping 
hierarchy.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where selected.name == param.object;
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select one lif related by sub->LIF[R347];
    if ( empty lif )
      create object instance sm of SM;
      create object instance lif of LIF;
      relate lif to sm across R300;
      relate lif to sub across R347;
    end if;
    create object instance spl of SPL;
    create object instance sms of SMS;
    relate lif to sms across R362 using spl;
    select one obj related by sub->OBJ[R107];
    if (not empty obj)
      create object instance gs of GS;
      relate gs to sms across R363;
    else
      select one prp related by sub->PRP[R107];
      select many sbts related by prp->SBT[R122];
      for each sbt in sbts
        create object instance sps of SPS;
        relate sps to sms across R363;
        select any sbs related by sbt->OBS[R126]->SBS[R125];
        if (not empty sbs)
          select one obs related by sbs->OBS[R125];
          unrelate sbs from obs across R125;
          delete object instance sbs;
          relate sps to obs across R125;
        else 
          create object instance obs of OBS;
          relate obs to sps across R125;
          relate sbt to obs across R126;
        end if;
        if (prp.hasPeerSegment())
          create object instance psg of PSG;
          relate psg to sps across R364;
        else
          create object instance ssg of SSG;
          relate ssg to sps across R364;
        end if;
      end for;
    end if;
    LOG::LogInfo( message:"Lifecycle state model created without states!" );
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("4378e9bf-9dc1-459e-bea9-e610030905b5",
	"b8989a56-03af-44dc-8124-20b275769095",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("1badd961-6af6-4964-8d99-67e61d35e654",
	"b8989a56-03af-44dc-8124-20b275769095",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"4378e9bf-9dc1-459e-bea9-e610030905b5",
	'The name of the object that has behavior specified by the state model.');
INSERT INTO PE_PE
	VALUES ("b8989a56-03af-44dc-8124-20b275769095",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	"00000000-0000-0000-0000-000000000000",
	'createTransitionAndEvent',
	'Adds a successful transition to an existing state model between the specified 
to and from states. Creates and assigns the specified event to the exit rule 
created.
',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where (selected.name == param.object);
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select one model related by sub->LIF[R347]->SM[R300];
    if (param.isAssigner)
      select one model related by sub->ASR[R354]->SM[R300];
    end if;
    if (empty model)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"State model not instantiated!" );
    else
      select any fsta related by model->STA[R341] where selected.name == param.fromState;
      select any tsta related by model->STA[R341] where selected.name == param.toState;
      if (empty fsta or empty tsta)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"State, " + param.fromState + " or " + param.toState + ", not instantiated!" );
      else
        select one del related by fsta->DEL[R305];
        if (not empty del)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"From state can''t be a deletion state!" );
        else
          select any evt related by fsta->LIV[R305]->EXRL[R324]->EVT[R326] where selected.name == param.eventName;
          if (not empty evt)
            result = creationResult_t::FAILURE;
            LOG::LogFailure( message:"Event, " + param.eventName + ", already exits state, " + fsta.name + ", at a different exit point!" );
          else
            select any evt from instances of EVT where (selected.name == param.eventName) and (selected.object_name == param.object);
            if (empty evt)
              // Create event
              create object instance evt of EVT;
              relate evt to sub across R535;
              create object instance asa of ASA;
              relate asa to evt across R506;
              create object instance acc of ACC;
              relate acc to asa across R505;
              acc.name = param.eventName;
            end if;
            // Do the "to" transition.
            create object instance trule of TRUL;
            select one enrl related by tsta->ENRL[R325];
            if (empty enrl)
              create object instance enrl of ENRL;
            end if;
            relate trule to enrl across R321;
            relate enrl to tsta across R325;
            create object instance tr of TR;
            relate tr to enrl across R323;
            // Always successful in this bridge. "Can''t happen" and "event ignored" 
            // have their own bridges. 
            create object instance st of ST;
            relate st to tr across R355;
            relate st to tsta across R332;
            // Do the "from" transition.
            create object instance trulx of TRUL;
            create object instance exrl of EXRL;
            relate trulx to exrl across R321;
            relate exrl to tr across R329;
            select one liv related by fsta->LIV[R305];
            relate liv to exrl across R324;
          end if;
        end if;
      end if;
    end if;
  end if;
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("6c53c1c8-2dc3-4c38-9845-243a42e42338",
	"d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("e3d5e31b-3a59-4a1d-be6d-0509691ad456",
	"d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	'fromState',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"5a2f42f8-ae6f-4dc9-a5cf-2264a28049b3",
	'The state that is the start state for the transition.');
INSERT INTO S_SPARM
	VALUES ("809af9dd-7b94-4cea-a946-008174c84734",
	"d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	'toState',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"e3d5e31b-3a59-4a1d-be6d-0509691ad456",
	'The state that is the end state for the transition.
');
INSERT INTO S_SPARM
	VALUES ("5a2f42f8-ae6f-4dc9-a5cf-2264a28049b3",
	"d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"6c53c1c8-2dc3-4c38-9845-243a42e42338",
	'The name of the object that has behavior specified by the state model.');
INSERT INTO S_SPARM
	VALUES ("ebb147ee-d285-4822-bc13-3dbf7c0f8188",
	"d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	'isAssigner',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"809af9dd-7b94-4cea-a946-008174c84734",
	'Set to true if the transition is contained in an assigner state model.');
INSERT INTO S_SPARM
	VALUES ("963edebc-8969-46fb-aaca-378967dfe3c0",
	"d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	'eventName',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ebb147ee-d285-4822-bc13-3dbf7c0f8188",
	'');
INSERT INTO PE_PE
	VALUES ("d72be6a6-e318-40c0-9b74-dfa7bcffe7df",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("a8a43003-722f-494d-8dff-9645004e6b30",
	"00000000-0000-0000-0000-000000000000",
	'createUnsuccessfulTransition',
	'Create a "Can''t Happen" or "Event Ignored" transistion between two existing 
states.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where selected.name == param.object;
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select one model related by sub->LIF[R347]->SM[R300];
    if (empty model)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"State model not instantiated!" );
    else
      select any fsta related by model->STA[R341] where selected.name == param.fromState;
      select any tsta related by model->STA[R341] where selected.name == param.toState;
      if (empty fsta or empty tsta)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"State, " + param.fromState + " or " + param.toState + ", not instantiated!" );
      else
        // Do the "to" transition.
        create object instance trule of TRUL;
        create object instance enrl of ENRL;
        relate trule to enrl across R321;
        relate enrl to tsta across R325;
        create object instance tr of TR;
        relate tr to enrl across R323;
        create object instance ut of UT;
        relate ut to tr across R355;
        if (transition_t::CANNOT_HAPPEN == param.type)
          create object instance cht of CHT;
          relate cht to ut across R331;
        else
          create object instance eit of EIT;
          relate eit to ut across R331;
        end if;
        create object instance trulx of TRUL;
        create object instance exrl of EXRL;
        relate trulx to exrl across R321;
        relate exrl to tr across R329;
        select one liv related by fsta->LIV[R305];
        relate liv to exrl across R324;
        LOG::LogInfo( message:"Transition rules created without event!" );
      end if;
    end if;
  end if;
end if;
return result;

',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("9c7803dc-8571-48fa-b070-53cfbcb456c5",
	"a8a43003-722f-494d-8dff-9645004e6b30",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("9c0014ff-7450-47cc-932e-32ea386daebe",
	"a8a43003-722f-494d-8dff-9645004e6b30",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"9c7803dc-8571-48fa-b070-53cfbcb456c5",
	'The name of the object that has behavior specified by the state model.');
INSERT INTO S_SPARM
	VALUES ("75040213-5fa7-4166-8229-b912e2c2a5b2",
	"a8a43003-722f-494d-8dff-9645004e6b30",
	'fromState',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"9c0014ff-7450-47cc-932e-32ea386daebe",
	'The state that is the start state for the transition.
');
INSERT INTO S_SPARM
	VALUES ("fc808342-45df-4742-b998-a28444c0f5ab",
	"a8a43003-722f-494d-8dff-9645004e6b30",
	'isAssigner',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"d280505d-df3d-4a0b-b85f-8ac77e3bd059",
	'Set to true if the state is contained in an assigner state model.');
INSERT INTO S_SPARM
	VALUES ("d280505d-df3d-4a0b-b85f-8ac77e3bd059",
	"a8a43003-722f-494d-8dff-9645004e6b30",
	'toState',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"75040213-5fa7-4166-8229-b912e2c2a5b2",
	'The state that is the end state for the transition.
');
INSERT INTO S_SPARM
	VALUES ("2f00ed02-49e4-4eb4-8932-51e9aad17674",
	"a8a43003-722f-494d-8dff-9645004e6b30",
	'type',
	"03b0733d-5e0d-42d5-bcd9-60e8ee2ee83c",
	0,
	'',
	"fc808342-45df-4742-b998-a28444c0f5ab",
	'');
INSERT INTO S_DT_PROXY
	VALUES ("03b0733d-5e0d-42d5-bcd9-60e8ee2ee83c",
	"00000000-0000-0000-0000-000000000000",
	'transition_t',
	'An enumeration of the types of entries that are added to cells of a state 
transistion table (STT).

"the STT is a far superior representation for verifying the completenes of and 
consistency of the transition rules. Filling out the STT requires you to 
consider the effect of every event-state combination." [OL:MWS]',
	'',
	'../../../DataTypes/DataTypes.xtuml');
INSERT INTO PE_PE
	VALUES ("a8a43003-722f-494d-8dff-9645004e6b30",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	"00000000-0000-0000-0000-000000000000",
	'addParameterToEvent',
	'Adds a parameter of the specified type to the named event.
',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where (selected.name == param.object);
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated in domain!" );
  else
    select any evt from instances of EVT where (selected.name == param.event) and (selected.object_name == sub.name);
    if (empty evt)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Event, " + param.event + ", of object, " + param.object + ", not instantiated!" );
    else
      select one acc related by evt->ASA[R506]->ACC[R505];
      select any prm related by acc->PRM[R540] where (selected.name == param.name) and (selected.accessor_name == param.event);
      if (not empty prm)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Parameter data," + param.name + ", already added to accessor!" );
      else
        select any type from instances of TYPE where selected.name == param.type;
        if (not empty type)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Type, " + param.type + ", not instantiated!" );
        else
          select one enrl related by evt->ENRL[R356];
          select many ends related by enrl->END[R357] where selected.type_name == type.name;
          spotFound = false;
          for each end in ends
            if (end.type_name == param.type)
              select any evp related by end->EVP[R358] where selected.accessor_name == evt.name;
              if (empty evp)
                create object instance prm of PRM;
                relate prm to acc across R540;
                create object instance evp of EVP;
                relate evp to prm across R542;
                relate evp to end across R358;
                spotFound = true;
                break;
              end if;
            end if;
          end for;
          if (not spotFound)
            result = creationResult_t::FAILURE;
            LOG::LogFailure( message:"No entry data found for parameter type, " + type.name + "!" );
          end if;
        end if;
      end if;
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("5d8addf0-51e9-4f56-bc42-ececf5baa085",
	"e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("e682ae3c-e2b0-4657-b366-df526a739d16",
	"e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"5d8addf0-51e9-4f56-bc42-ececf5baa085",
	'The name of the object by which the event is accessed.');
INSERT INTO S_SPARM
	VALUES ("a5ba725a-03b8-463d-971d-9a973d075ee0",
	"e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	'event',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"e682ae3c-e2b0-4657-b366-df526a739d16",
	'The name of the event.');
INSERT INTO S_SPARM
	VALUES ("04942de9-17e8-478b-90bb-a4430263c2a2",
	"e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"a5ba725a-03b8-463d-971d-9a973d075ee0",
	'The name of the data parameter.');
INSERT INTO S_SPARM
	VALUES ("10c2d4de-1050-44fd-8454-b1bc985c2996",
	"e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"04942de9-17e8-478b-90bb-a4430263c2a2",
	'The identifier for the type that defines the data parameter.');
INSERT INTO PE_PE
	VALUES ("e3e23288-f9ff-4dc6-a452-ce15c2d488a7",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("02ed75c2-9bb5-4210-a818-c07edd2bd4f3",
	"00000000-0000-0000-0000-000000000000",
	'createAssignerStateModel',
	'',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  // Assigner state model must be instantiated for the whole set.
  select any obj from instances of OBJ where selected.name == param.object;
  if (empty obj)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select any sub from instances of SUB where selected.name == param.object;
    if ( sub.hasStateModel( assigner:true ) )
      result = creationResult_t::DUPLICATE;
      LOG::LogFailure( message:"State model already instantiated!" );
    else
      create object instance sm of SM;
      create object instance asr of ASR;
      relate asr to sm across R300;
      relate asr to sub across R354;
      create object instance smc of SMC;
      create object instance asm of ASM;
      relate asm to smc across R350;
      relate asr to asm across R352;
      LOG::LogInfo( message:"Assigner state model created without states!" );
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("77cb5291-adb8-4faa-9fd6-fda2fbcf7d70",
	"02ed75c2-9bb5-4210-a818-c07edd2bd4f3",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("69027273-30d8-4d6d-b530-a1e474604854",
	"02ed75c2-9bb5-4210-a818-c07edd2bd4f3",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"77cb5291-adb8-4faa-9fd6-fda2fbcf7d70",
	'The name of the object that has behavior specified by the state model.');
INSERT INTO PE_PE
	VALUES ("02ed75c2-9bb5-4210-a818-c07edd2bd4f3",
	1,
	"e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO PE_PE
	VALUES ("e7e93a5f-3b02-42b2-a86f-4e1db16c54d0",
	1,
	"9ddf81e7-a28d-4e3c-b59b-ce104ef0f540",
	"00000000-0000-0000-0000-000000000000",
	7);
INSERT INTO EP_PKG_PROXY
	VALUES ("9ddf81e7-a28d-4e3c-b59b-ce104ef0f540",
	"00000000-0000-0000-0000-000000000000",
	"c8b88000-dddc-4206-8410-2f69b8f86b67",
	'Incoming Bridges',
	'Bridges into the metamodel domain.',
	0,
	'../Incoming Bridges.xtuml');
INSERT INTO S_SYS_PROXY
	VALUES ("c8b88000-dddc-4206-8410-2f69b8f86b67",
	'shlaer-mellor-metamodel',
	1,
	'../../../../shlaer-mellor-metamodel.xtuml');
